import request from '@/utils/request'

export function addPost(data) {
  return request({
    url: '/post/add',
    method: 'post',
    data
  })
}

export function getPostList(pageNum, type, userId, otherId) {
  return request({
    url: '/post/list',
    method: 'get',
    params: {
      pageNum, type, userId, otherId
    }
  })
}

export function delPost(id) {
  return request({
    url: `/post/del?id=${id}`,
    method: 'get'
  })
}

export function list(id) {
  return request({
    url: `/post/list`,
    method: 'get'
  })
}

export function listAll() {
  return request({
    url: `/post/list`,
    method: 'get'
  })
}
